home *** CD-ROM | disk | FTP | other *** search
- Path: odin.diku.dk!zznyyd
- From: zznyyd@diku.dk (Finn Nielsen)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Sorting a list
- Date: 21 Mar 1996 11:19:08 GMT
- Organization: Department of Computer Science, U of Copenhagen
- Sender: zznyyd@berling.diku.dk
- Distribution: world
- Message-ID: <ZZNYYD.96Mar21121908@diku.dk>
- References: <272.6650T63T1340@sn.no> <314F9F68.48E2@sapiens.com>
- Reply-To: zznyyd@diku.dk
- NNTP-Posting-Host: odin.diku.dk
- In-reply-to: Avi Lev's message of Wed, 20 Mar 1996 08:02:16 +0200
-
-
- In article <314F9F68.48E2@sapiens.com> Avi Lev <avil@sapiens.com> writes:
- > Christopher Naas wrote:
- > >
- > > What's the absolutely fastest algorithm for sorting a List with around 1000
- > > items alphabetically?
- > >
- >
- > well, the fastest way is no doubt, bubble sort!!! but you have to perform the sort on a
- > list of pointers to the strings not on the strings themselves otherwise it'll be slower.
-
- I really hope you're just kidding here: bubble sort is the slowest sorting
- algorithm ever. ALTO you're right about sorting the pointers instead of the
- actual strings. I recommend using QuickSort for sorting the pointers and
- natural merge sort if you're using linked lists...
-
- --
- /-ZzNyYd! Design.--------------------Statement: Perhaps the world exists...-\
- Finn Nielsen <zznyyd@diku.dk> - WWW: http://www.diku.dk/students/zznyyd/
- (Student) Department of Computer Science, University of Copenhagen, Denmark
- \-PGP: ID=AB1AB0AD Fingerpr=58EC5501A99C0B40E1943FDACC239217--Pulven Rulez!-/
-